home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / C for beginners.adf / source / stringtest.c < prev    next >
C/C++ Source or Header  |  1978-01-17  |  380b  |  17 lines

  1. /* stringfunc.c test 17.2 */
  2.  
  3. #include "stringfunc.c"
  4.  
  5. /* Global arrays can be initialized! */
  6.  
  7. char string1[] = "Hello!";
  8. char string2[7] = { 'H', 'e', 'l', 'l', 'o', '!', 0};
  9.  
  10. main()
  11. {
  12.    printf("\nComparison of >%s< and >%s< is %d\n", string1, string2, strcmp(string1, string2));
  13.    printf("Now >%s< and >%s< Result in %d\n\n", string1, "Huhu!", strcmp(string1, "Huhu!"));
  14.  
  15. }
  16.  
  17.